import os  
import random  
filename = 'in.bin'  
filesize = 1024
with open(filename, 'wb') as file:  
    for _ in range(filesize):  
        random_byte = random.randint(0, 255).to_bytes(1, 'big')  
        file.write(random_byte)  
